/**
 * Defines the main routes in the application.
 * The routes you see here will be anchors '#/' unless specifically configured otherwise.
 */

define(['./app'], function (app) {
    'use strict';
    return app.config(function ($stateProvider,$urlRouterProvider) {

        $urlRouterProvider.otherwise('/error');

        $stateProvider
        //系统模块列表
        .state("sysmodulement",{
            url:'/sysmodulement',
            templateUrl:"app/sysrole/sysmodulement.html",
            params:{
                'operate':'find'
            }
        })
        //系统模块添加
        .state("sysmodule",{
            url:'/sysmodule',
            templateUrl:"app/sysrole/sysmodule.html",
            params:{
                'operate':'save'
            }
        })
        //系统模块功能编辑
        .state("sysmoduleaction",{
            url:'/sysmoduleaction',
            templateUrl:"app/sysrole/sysmoduleaction.html",
            params:{
                'operate':'edit'
            }
        })
        //系统模块功能查询
        .state("sysmoduleactionment",{
            url:'/sysmoduleactionment',
            templateUrl:"app/sysrole/sysmoduleactionment.html",
            params:{
                'operate':'find'
            }
        })
        //系统模块功能单个编辑
        .state("sysmoduleactionsingle",{
            url:'/sysmoduleactionsingle',
            templateUrl:"app/sysrole/sysmoduleactionsingle.html",
            params:{
                'operate':'edit'
            }
        })
        //系统角色查询
        .state("sysrolement",{
            url:'/sysrolement',
            templateUrl:"app/sysrole/sysrolement.html",
            params:{
                'operate':'find'
            }
        })
        //系统角色添加
        .state("sysrole",{
            url:'/sysrole',
            templateUrl:"app/sysrole/sysrole.html",
            params:{
                'operate':'save'
            }
        })
        //系统角色权限添加
        .state("sysroleaction",{
            url:'/sysroleaction',
            templateUrl:"app/sysrole/sysrolemoduleaction.html",
            params:{
                'operate':'edit'
            }
        })
        //系统用户列表
        .state("basicuserment",{
            url:'/basicuserment',
            templateUrl:"app/basicuser/basicuserment.html",
            params:{
                'operate':'find'
            }
        })
        //添加系统用户
        .state("basicuser",{
            url:'/basicuser',
            templateUrl:"app/basicuser/basicuser.html",
            params:{
                'operate':'save'
            }
        })
        //设置系统用户权限
        .state("basicuserrole",{
            url:'/basicuserrole',
            templateUrl:"app/basicuser/basicuserrole.html",
            params:{
                'operate':'edit'
            }
        })
        //系统邮箱
        .state("sysmailment",{
            url:'/sysmailment',
            templateUrl:"app/sysmail/sysmailment.html",
            params:{
                'operate':'find'
            }
        })
        //系统邮箱添加
        .state("sysmail",{
            url:'/sysmail',
            templateUrl:"app/sysmail/sysmail.html",
            params:{
                'operate':'save'
            }
        })
        //支付方式列表
        .state("paymentment",{
            url:"/paymentment",
            templateUrl:"app/payment/paymentment.html",
            params:{
                operate:'find'
            }
        })
        //支付方式添加
        .state("payment",{
            url:"/payment",
            templateUrl:"app/payment/payment.html",
            params:{
                operate:'save'
            }
        })
        //查询物流商信息
        .state("logisticsbusinessment",{
            url:"/logisticsbusinessment",
            templateUrl:"app/logistics/logisticsbusinessment.html",
            params:{
                operate:'find'
            }
        })
        //添加物流商信息
        .state("logisticsbusiness",{
            url:"/logisticsbusiness",
            templateUrl:"app/logistics/logisticsbusiness.html",
            params:{
                operate:'save'
            }
        })
        //查询区域信息
        .state("basicregionment",{
            url:"/basicregionment",
            templateUrl:"app/basicregion/basicregionment.html",
            params:{
                operate:'find'
            }
        })
        //添加区域信息
        .state("basicregion",{
            url:"/basicregion",
            templateUrl:"app/basicregion/basicregion.html",
            params:{
                operate:'save'
            }
        })
        //区域运费信息
        .state("logisticsbusinessregionpricement",{
            url:"/logisticsbusinessregionpricement",
            templateUrl:"app/logistics/logisticsbusinessregionpricement.html",
            params:{
                operate:'find'
            }
        })
        //添加区域运费信息
        .state("logisticsbusinessregionprice",{
            url:"/logisticsbusinessregionprice",
            templateUrl:"app/logistics/logisticsbusinessregionprice.html",
            params:{
                operate:'save'
            }
        })
    });
});
